home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / File class library / headers / CFolder.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.6 KB  |  56 lines  |  [TEXT/KAHL]

  1. /*
  2.  
  3.   CFolder.h
  4.   Superclass:    CFile
  5.  
  6.     CFile plus directory manipulation.
  7.  
  8.   October 8, 1992  isl
  9.   
  10. */
  11.  
  12. #define    _H_CFolder                                        //    Include this file only once
  13.  
  14. #include    <CIsleFile.h>                                //    Superclass definitions
  15.  
  16. #include    <CCustomIcon.h>                            //    For custom folder icons
  17.  
  18. #define        kFolderError                2365        //    CFolder specific errors
  19. #define        kFolderFileConflict    1                //    Tried to create a folder, but a file had the name
  20. #define        kBadSystem                    2                //    Current System software cannot deal with custom icons
  21. #define        kCustomIconFile            "\pIcon\r"
  22.  
  23. /*=====================*/
  24. /*===---------------===*/
  25.  
  26. class CFolder : public CIsleFile
  27. Begin
  28. public:
  29.     long    folderDirID;                                    //    The ID of the folder itself
  30.     
  31.     
  32. public:
  33.     void                    IFolder                                //    Initialize the object
  34.                             (    void
  35.                             );
  36.  
  37.     virtual    void    CreateNew                            //    Create a folder at the current level, no user query
  38.                             (    OSType        creator,            //    The folder's creator
  39.                                 OSType        type                    //    The folder's type
  40.                             );
  41.     virtual    void    CreateWithIcon                //    Create a folder with a special icon
  42.                             (    OSType        creator,            //    The file's creator
  43.                                 OSType        type,                    //    The file's type
  44.                                 short            iconID                //    The resource ID of the icon
  45.                             );
  46.     virtual    Boolean    ExistsOnDisk                //    Does the folder exist?
  47.                             (    void                                        //    No arguments
  48.                             );
  49.     virtual    void    GetPath                                //    Provide folder's path as a string of characters
  50.                             (    Str255        path,                    //    The string describing the path
  51.                                 Str255        delimiter            //    The string describing path delimiters
  52.                             );
  53. End;
  54.  
  55. /*===---------------===*/
  56. /*=====================*/